	/**
	 * 去字前后空格
	 * @param str
	 * @returns
	 */
	function trim(str){   
	     str = str.replace(/^(\s|\u00A0)+/,'');   
	     for(var i=str.length-1; i>=0; i--){   
	         if(/\S/.test(str.charAt(i))){   
	             str = str.substring(0, i+1);   
	             break;   
	         }   
	     }   
	     return str;   
	}  
	/**
	 * 选择用户
	 * @param userName  姓名文本框名称
	 * @param txtName   ID文本框名称
	 * @param userAccount  账号文本框名称
	 * @param queryType    查询类型，目前systemType（用户列表）、confType(重用用户)，待扩展
	 * @param isMultiple   是否多谢，取值'true','false'
	 */
	function selectUserAllInOne(userName,txtName,userAccount,queryType,isMultiple) {
	
		art.dialog.open(ctx + "common/selectuser/select_user_any_way.do",{id:"userDialog",title:"用户选择",width:"600px",height:"400px"});
	  	art.dialog.data('parentWindow',window);
	  	art.dialog.data('userId_txtName',userName);
	  	art.dialog.data('userName_txtName',txtName);
	  	art.dialog.data('userAccount_txtName',userAccount);
	  	
		//设置查询类型
		if(queryType==""){
			art.dialog.data('queryType','systemType');
		}else{
			art.dialog.data('queryType',queryType);
		}
		//设置是否多选
		if(isMultiple=="true"){
			art.dialog.data('isMultiple','true');
		}else{
			art.dialog.data('isMultiple','false');
		}
	 
	}
	/**
	 * 根据url地址解析参数
	 * @param sName
	 * @returns {String}
	 */
	function getpara(sName) {
		var sSource = String(window.document.location);
		var sReturn = "";
		var sQUS = "?";
		var sAMP = "&";
		var sEQ = "=";
		var iPos;
	
		iPos = sSource.indexOf(sQUS);
	
		var strQuery = sSource.substr(iPos, sSource.length - iPos);
		var strLCQuery = strQuery.toLowerCase();
		var strLCName = sName.toLowerCase();
	
		iPos = strLCQuery.indexOf(sQUS + strLCName + sEQ);
		if (iPos == -1)
		{
			iPos = strLCQuery.indexOf(sAMP + strLCName + sEQ);
			if (iPos == -1)
			return "";
		}
	
		sReturn = strQuery.substr(iPos + sName.length + 2,strQuery.length-(iPos + sName.length + 2));
		var iPosAMP = sReturn.indexOf(sAMP);
	
		if (iPosAMP == -1)
			return sReturn;
		else
		{
			sReturn = sReturn.substr(0, iPosAMP);
		}
	
		return sReturn;
	}
	    

 